<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" %>
<%@ taglib prefix="s" uri="http://stripes.sourceforge.net/stripes.tld" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>

<%

        if (session.getAttribute("loggedIn") != null) {
            if (((Boolean) session.getAttribute("loggedIn"))) {

                if (session.getAttribute("role").equals("admin")) {
                    response.sendRedirect("managerHome.jsp");
                }
            } else {
                response.sendRedirect("index.jsp");
            }
        } else {

            response.sendRedirect("index.jsp");
        }

    


%>


<s:layout-render name="/layout.jsp" headline="Delivery Service">
    <s:layout-component name="body">
        <s:useActionBean var="actionBean" beanclass="cz.muni.fi.pa165.web.CourierShipmentActionBean"/>
        <h2 style="text-align: center;"><f:message key="editShipment"/></h2>
        <s:form style="padding-left: 28%; padding-top: 5%;" beanclass="cz.muni.fi.pa165.web.CourierShipmentActionBean">
            <s:errors/> 
            <s:hidden name="shipment.id"/>
                <table>                    
                    <tr>
                        <th style="text-align: left;"><f:message key="Manager-Shipment-list-shipmentState"/></th>
                        <td style="padding-left: 5%;"><s:text id="shipmentState" name="shipment.shipmentState"/></td>
                    </tr>
                    <tr>
                        <th style="text-align: left;"><s:label for="update" name=" "/></th>
                        <td style="padding-left: 5%;"><s:submit class="btn btn-block" name="update"><f:message key="ManagerEDITShipmentHeadline"/></s:submit></td>
                    </tr>
                </table>
        </s:form>
    </s:layout-component>
</s:layout-render>
